import React, { ReactElement } from 'react'
import { ConfigProvider } from 'antd'
import theme from '../../config/theme'
import zhCN from 'antd/locale/zh_CN';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';

dayjs.locale('zh-cn');

const getPopupContainer = () => document.body;

const Enhance = (props) => {
  return (
    <ConfigProvider 
      getPopupContainer={getPopupContainer}
      theme={theme}
      locale={zhCN}
    >
      {props.children}
    </ConfigProvider>
  )
}

export default Enhance
